1. Field of the Invention
The present invention relates to a video coding apparatus capable of highly efficient motion compensation prediction.
2. Description of the Related Art
Conventionally, a video coding apparatus for coding video data is widely known. FIG. 11 is a block diagram showing an example of the conventional video coding apparatus. As shown in FIG. 11, the video coding apparatus comprises a subtractor 51 for generating a predictive error signal by subtracting a predictive image data from an original image data, an orthogonal transformer 52 for orthogonal transformation or, for example, DCT transformation of the predictive error signal output from the subtractor 51, a quantizer 53 for quantizing the orthogonally transformed data, and a variable-length coder 54 for variable-length coding the quantized data. The apparatus further comprises an inverse quantizer 55 for inversely quantizing the data quantized by the quantizer 53, an inverse orthogonal transformer 56, an adder 57, a frame memory 58 for storing a reproduced image temporarily, a motion compensation predictor 59 for performing motion compensation with the original image data and the reproduced image data from the frame memory 58, and a controller 60 for controlling the operation of the various parts described above.
In this video coding apparatus, the search for an optimum motion vector by the motion compensation predictor 59 has a considerable effect on the coding efficiency. Conventionally, there has been generally employed the full search method for comprehensively searching all portions around the motion vector selected as a candidate for a portion to be referred as a method for searching an optimum motion vector. This total search method has a high accuracy of acquiring an optimum motion vector, but requires a vast amount of arithmetic operations leading to the problem of a very large size of the circuit for realizing it.
In view of this, another method has been proposed in which a motion vector selected by the macroblock coded immediately before a macroblock to be coded is used as an initial candidate, and only the vectors in the vicinity thereof are searched as search candidates.
In this conventional method, however, in the case that signal properties are much different between the macroblock to be coded and the macroblock coded immediately before, for example, in the case that these two macroblocks are image portions representing different objects, for lack of the correlationship between the optimum motion vectors of both macroblocks, the accuracy of detecting an optimum motion vector for the macroblock to be coded is so reduced as to deteriorate the coding efficiency. Also, the search area in this method is considerably reduced as compared with the search area in the total search method described above. The shape of search area, however, is generally a square similar to that in the total search method, which gives rise to the problem that wasteful calculations are performed in search of an optimum motion vector.
The object of the present invention is to provide a video coding apparatus capable of highly accurate detection of an optimum motion vector with a small calculation amount.
To attain the above object, this invention is characterized in that an optimum motion vector determination apparatus comprises motion vector candidate selection means for selecting candidates of motion vectors at the portion to be coded, predictive motion vector determination means for determining an optimum predictive motion vector from among the candidate motion vectors, variation calculation means for determining the degree of variance of motion vectors in the image based on the motion vectors already determined, means for determining the search shape of the motion vectors based on the degree of distribution and means for searching the motion vectors in the search shape from using the predictive motion vector determined by the predictive motion vector determination means as an origin of search and determining an optimum motion vector among the motion vectors searched.
According to this aspect, an optimum predictive motion vector is determined from among motion vector candidates for the portion to be coded, and further, with the predictive motion vector as an origin of search, the interior of the search shape determined according to the previously-determined degree of motion vector variances is searched to determine an optimum motion vector.
Therefore, as compared with the conventional method in which the adjacent motion vector immediately to the left of the portion to be coded is considered an optimum motion vector, the reliability can be increased considerably without much increase in the amount of calculation.